import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component:()=>import('@/views/BackendSystem/Login.vue'),
  },
  //  后端布局
  {
    path: '/backendFramework/',
    name: 'BackendFramework',
    component:()=>import('@/views/BackendSystem/BackendFramework.vue'),
    children:[
      {
        path: 'blog',
        name: 'Blog',
        component:()=>import('@/views/BackendSystem/Blog.vue'),
      },{
        path: 'profile',
        name: 'Profile',
        component:()=>import('@/views/BackendSystem/Profile.vue'),
      }
    ]
  },
//    前端布局
  {
    path: '/frontFramework/',
    name: 'FrontFramework',
    component:()=>import('@/views/FrontSystem/FrontFramework.vue'),
    children:[
      {
        path: 'blogManage',
        name: 'BlogManage',
        component:()=>import('@/views/FrontSystem/BlogManage.vue'),
      },
      {
        path: 'blogView',
        name: 'BlogView',
        component:()=>import('@/views/FrontSystem/BlogView.vue'),
      },

    ]
  },

]

const router = new VueRouter({
  mode:"history",
  routes: routes,
})

export default router
